#ifndef VCU_CORE_H
#define VCU_CORE_H

#define __APP_NAME__ "vcu_node"

#include <ros/ros.h>
#include <can_msgs/Frame.h>
#include <geometry_msgs/TwistStamped.h>
#include <geometry_msgs/Twist.h>
#include <bitset>  

class Vcu{
    public:
        Vcu();
        ~Vcu();
        void run();
    
    private:
        ros::NodeHandle nh_;
        ros::NodeHandle private_nh_;
    
    private:
        std::string input_movebase_cmd_topic_;
        std::string output_canframe_topic_;
    
    private:
        /* 轮距 单位m */
        double track_base_;
        /* 轮径 单位m */
        double track_radius_;
    
    private:
        std::shared_ptr<geometry_msgs::TwistStamped> movebase_ctrl_cmd_;

    private:
        ros::Subscriber movebase_cmd_sub_;
        ros::Publisher sent_canframe_pub_;
    
    private:
        void ctrl_cmd_callback(const geometry_msgs::Twist::ConstPtr& msg);
        void vehicle_initialized();
        void process(const ros::TimerEvent& e);
};
#endif